package se.teamscape.client.event;

import com.google.gwt.event.shared.GwtEvent;

public class LoginRequestEvent extends GwtEvent<LoginRequestEventHandler> {

    public static Type<LoginRequestEventHandler> TYPE = new Type<LoginRequestEventHandler>();
    private final String mUsername;
    private final String mPassword;

    public LoginRequestEvent(String username, String password) {
        mUsername = username;
        mPassword = password;
    }

    public String getUsername() {
        return mUsername;
    }

    public String getPassword() {
        return mPassword;
    }

    @Override
    public Type<LoginRequestEventHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(LoginRequestEventHandler handler) {
        handler.onLoginRequest(this);
    }

}
